package com.task.model;


/**
 * 任务调度实体类
 * @author carey
 * @docRoot TaskModel.java
 * @version 1.0
 * @see
 * @since
 */
public class TaskModel {

    private  String taskId;
    private final String taskName;
    private final String classPath;
    private String crontab;

    public String getTaskName() {
        return taskName;
    }

    private String status;



    public void setTaskId(String taskId) {
        this.taskId = taskId;
    }

    public String getTaskId() {
        return taskId;
    }

    public String getClassPath() {
        return classPath;
    }

    public String getCrontab() {
        return crontab;
    }

    public String getStatus() {
        return status;
    }

    public void setCrontab(String crontab) {
        this.crontab = crontab;
    }

    public void setStatus(String status) {
        this.status = status;
    }


    public TaskModel(Builder builder){
        this.taskId=builder.taskId;
        this.classPath=builder.classPath;
        this.taskName=builder.taskName;
    }

   public static class Builder{
        private  String taskId;
        private  String classPath;
        private  String taskName;

        public Builder setTaskId(String taskId){
            this.taskId=taskId;
            return this;
        }
        public Builder setClassPath(String classPath){
             this.classPath=classPath;
             return this;
        }
       public Builder setTaskName(String taskName){
           this.taskName=taskName;
           return this;
       }

        public TaskModel build(){
            return  new  TaskModel(this);
        }

    }
}
